package com.cqvip.innocence.project.model.entity;

import com.cqvip.innocence.common.annotation.DocumentId;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @ClassName EsTestInfo
 * @Description es测试数据
 * @Author Innocence
 * @Date 2021/6/16 13:57
 * @Version 1.0
 */
@Data
@Document(indexName = "test_info")
public class EsTestInfo implements Serializable {
    private static final long serialVersionUID = 6735913456541605819L;

    @DocumentId
    @Field(type = FieldType.Keyword)
    private String infoId;

    private String name;

    @Field(type = FieldType.Integer)
    private Integer age;

    @Field(type = FieldType.Keyword)
    private String sex;

    @Field(type = FieldType.Keyword)
    private String[] roles;
}
